Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use env variable to disable source maps #2818

Merged
merged 3 commits into from
Aug 9, 2017

Conversation

viankakrisna
Copy link
Contributor

@viankakrisna viankakrisna commented Jul 19, 2017

escape hatch for #2555 and various request for disabling source maps on production.
verified the changes using this command

REACT_APP_DISABLE_SOURCE_MAP=1 npm run build

and check build folder for the existence of source maps


Use this one for the latest changes

SOURCE_MAP=false npm run build

@Timer
Copy link
Contributor

Timer commented Aug 2, 2017

Hmm; I'm not sure if this is the best way to do this -- especially the REACT_APP_ prefix. We'd probably want to drop that...

@Timer
Copy link
Contributor

Timer commented Aug 2, 2017

Maybe just SOURCE_MAP=false?

@Timer Timer requested a review from gaearon August 2, 2017 14:13
@Timer Timer added this to the 1.0.11 milestone Aug 2, 2017
@miraage
Copy link

miraage commented Aug 3, 2017

What if we could control exact devtool value? Just make a special treatment for the none/false value. I do eject in every CRA app just to configure devtool and scss support so devtool customization would be really cool.

@viankakrisna
Copy link
Contributor Author

@miraage can you open a new issue for that? This pr aims to be an escape hatch for failed build because of the out of memory situation in #2555

@Timer Timer merged commit 1e3a64f into facebook:master Aug 9, 2017
@Timer
Copy link
Contributor

Timer commented Aug 9, 2017

Hi there! This change is out in react-scripts@1.0.11; please give it a go! Thanks.

JohnNilsson referenced this pull request in JohnNilsson/create-react-app-typescript Aug 9, 2017
* use env variable to disable source maps

* Rename to use SOURCE_MAP with explicit value

* Update webpack.config.prod.js
zangrafx added a commit to absolvent/create-react-app that referenced this pull request Aug 13, 2017
* commit 'bfaee410c502a95076a6bd89721c76ca08e15f7b': (39 commits)
  Publish
  Prepare for 1.0.11 release (facebook#2924)
  Update dev deps (facebook#2923)
  Update README.md
  Use env variable to disable source maps (facebook#2818)
  Make formatWebpackMessages return all messages (facebook#2834)
  Adjust the `checkIfOnline` check if in a corporate proxy environment (facebook#2884)
  Fix the order of arguments in spawned child proc (facebook#2913)
  Feature/webpack 3 4 (facebook#2875)
  Allow importing package.json (facebook#2468)
  Re-enable flowtype warning (facebook#2718)
  Format UglifyJs error (facebook#2650)
  Unstage yarn.lock pre-commit (facebook#2700)
  Update README.md
  Update README.md
  Add Electrode to alternatives (facebook#2728)
  Fix parsing HTML/JSX tags to real elements (facebook#2796)
  Update webpack version note (facebook#2798)
  Use modern syntax feature (facebook#2873)
  Allow use of scoped packages with a pinned version (facebook#2853)
  ...

# Conflicts:
#	packages/react-scripts/config/webpack.config.dev.js
#	packages/react-scripts/config/webpack.config.prod.js
#	packages/react-scripts/package.json
@gaearon
Copy link
Contributor

gaearon commented Aug 15, 2017

Was this added to docs in "Advanced Configuration"?

@Timer
Copy link
Contributor

Timer commented Aug 15, 2017

Yes.

@gaearon
Copy link
Contributor

gaearon commented Aug 15, 2017

Cool, thanks for confirming :-)

matart15 pushed a commit to matart15/create-react-app that referenced this pull request Aug 29, 2017
…react-app

* 'master' of https://github.com/facebookincubator/create-react-app: (36 commits)
  Publish
  Changelog for 1.0.12 (facebook#3016)
  Relax React dep requirements
  Default Favicon lossless optimisation (facebook#2917)
  update babel-runtime dependency in react-error-overlay and react-scripts (facebook#2991)
  Convert react-error-overlay to React (facebook#2515)
  Bump react-dev-utils
  Fix module function name in error overlay (facebook#3012)
  Docs: debugging in WebStorm (facebook#2986)
  Fix docs for `printFileSizesAfterBuild` (facebook#2942)
  Remove Modulus from user guide (facebook#2948)
  Remove superfluous lodash usage (facebook#2938)
  Update README.md (facebook#2927)
  Publish
  Prepare for 1.0.11 release (facebook#2924)
  Update dev deps (facebook#2923)
  Update README.md
  Use env variable to disable source maps (facebook#2818)
  Make formatWebpackMessages return all messages (facebook#2834)
  Adjust the `checkIfOnline` check if in a corporate proxy environment (facebook#2884)
  ...
JohnNilsson referenced this pull request in JohnNilsson/create-react-app-typescript Sep 9, 2017
* use env variable to disable source maps

* Rename to use SOURCE_MAP with explicit value

* Update webpack.config.prod.js
kasperpeulen pushed a commit to kasperpeulen/create-react-app that referenced this pull request Sep 24, 2017
* use env variable to disable source maps

* Rename to use SOURCE_MAP with explicit value

* Update webpack.config.prod.js
swengorschewski referenced this pull request in swengorschewski/cra-typescript-electron Oct 16, 2017
* use env variable to disable source maps

* Rename to use SOURCE_MAP with explicit value

* Update webpack.config.prod.js
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants